<?php
class ModelPageCommon extends Model{
	public function saveVisit($data){
		$this->db->query("INSERT INTO " . DB_PREFIX . "visit SET ip = '" . $this->db->escape($data['ip']) ."', date_added = NOW()");
	}
	
	public function getVisitsNum(){
		return $this->db->query("select COUNT(*) from ". DB_PREFIX . "visit ")->row;
	}
}
?>